#include <stdio.h>

int main()
{
	int x,n,sum=0;
	scanf("%d",&n);
	while(n)
	{
		scanf("%d",&x);
		if(x %2 == 0)
		   sum += x;
		   n--;
	}
	
	printf("%d",sum);
	
	return 0;
 } 
